package com.yt.order.models.dto;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.yt.common.dto.BaseDTO;

/**
 * 账单信息DTO
 *
 * @author yzz
 * @Date 2025-10-22 09:41:05
 */
@Data
@TableName("bill")
@ApiModel(value="账单信息对象", description="账单信息对象")
public class BillDTO extends BaseDTO implements Serializable {

    /**
     * 重写id字段并添加@TableId注解，指定主键生成策略为自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "主叫手机号（外键，关联phone_info表）")
    private String callerPhone;
    @ApiModelProperty(value = "被叫手机号（外键，关联phone_info表）")
    private String calleePhone;
    @ApiModelProperty(value = "本次通话使用的虚拟号（外键，关联virtual_number表）")
    private String virtualNumber;
    @ApiModelProperty(value = "通话时长（单位：秒）")
    private Integer callDuration;
    @ApiModelProperty(value = "本次通话总费用（单位：分）")
    private Integer totalFee;
    @ApiModelProperty(value = "虚拟号服务费用（单位：分）")
    private Long virtualFee;
    @ApiModelProperty(value = "接听时间")
    private Date answerTime;
    
    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    
    @Override
    public Long getId() {
        return id;
    }
    
    @Override
    public void setId(Long id) {
        this.id = id;
    }
}